package com.chentao.scala.controller

import com.alibaba.fastjson.JSONObject
import org.springframework.web.bind.annotation.{RequestMapping, ResponseBody, RestController}

@RestController
class HelloWorldController {

  @RequestMapping(value = Array("/index"))
  @ResponseBody
  def index():JSONObject = {
  
    var jsonObj = new JSONObject()
    jsonObj.put("age", 13)
    jsonObj.put("name", "chentao")
    jsonObj
  }
}

case class User(id : String, name : String, password : String, email : String, tel : String)
